-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenAlex web and JSON translator #3269
base: master
Are you sure you want to change the base?
Conversation
OpenAlex.js
Outdated
|
||
|
||
function detectWeb(doc, url) { | ||
if (url.includes('/works/w')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check that it matches the regex we're using below, just in case - don't want to detect and then throw an error in doWeb()
Co-authored-by: Abe Jellinek <jellinek@berkeley.edu>
This is great, many thanks! Can I check whether the translator will add the openalex id to the Zotero record? |
Ah, no. What would be the right format? I understand that they like the namespace prefix to be included? So |
Complements zotero/translators#3269
OpenAlex JSON.js
Outdated
@@ -165,6 +165,7 @@ function parseIndividual(data) { | |||
for (let tag of tags) { | |||
item.tags.push(tag.keyword); | |||
} | |||
item.extra = "openalex: " + data.ids.openalex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe capitalize? The site seems to use "OpenAlex" consistently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is a key:value pair, I figured I'd use the key that they use from their API? also more consistent with general Zotero & CSL variable naming. Happy to change though, obviously doesn't make a huge difference either way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We capitalize other identifier names in Extra, e.g. "ADS Bibcode".
@AbeJellinek I think this should be all set |
No description provided.